import { Component } from '@angular/core';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.scss']
})
export class HomeComponent {
  sg:any =[]

  constructor(){
    this.getWedata();
  }
  getWedata(){
    this.sg = [
    {
      img:"assets/img/图片3/maoxian.jpg",
      sa:"冒险村物语",
      sc:"经营村庄，招募勇士，击退恶龙，向理想村落进发！",
      image:"assets/img/图片3/tap.jpg",
      sb:"9.0",
      q1:"assets/img/图片3/zan.jpg",
      w1:"编辑推荐"
    },

    {
      
      img:"assets/img/图片3/yuntujihua.jpg",
      sa:"少女前线：云图计划",
      sc:"全新三星人形温蒂妮已上线绿洲！",
      image:"assets/img/图片3/tap.jpg",
      sb:"7.7",
      q1:"assets/img/图片3/lansexin.jpg",
      w1:"Rogulike #18"
    },

   
    {
      img:"assets/img/图片3/gongzhu.jpg",
      sa:"公主连结Re：Dive",
      sc:"两周年版本更新，看番一般的视觉盛宴。",
      image:"assets/img/图片3/tap.jpg",
      sb:"7.7",
      q1:"assets/img/图片3/zan.jpg",
      w1:"编辑推荐"
    },

    {
      img:"assets/img/图片3/mingri.jpg",
      sa:"明日方舟",
      sc:"肩负同伴的未来，开始拯救家园的旅程！",
      image:"assets/img/图片3/tap.jpg",
      sb:"8.4",
      q1:"assets/img/图片3/lansexin.jpg",
      w1:"热门榜 #30"
    }
  ]
    }

    async getGameTapFetch(){
      let response = await fetch("http://metapunk.cn:9999/parse/classes/GameTap?", {
        "headers": {
          "accept": "*/*",
          "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
          "sec-fetch-mode": "cors"
        },
        "referrer": "http://localhost:4040/",
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": null,
        "method": "OPTIONS",
        "mode": "cors",
        "credentials": "omit"
      })
    
      let data = await response.json()
      this.sg = data.results;
    }
  
  }